package com.yuyu.shop.infrastructure.persistence.impl;

import com.yuyu.shop.domain.shop.DO.ShopInfoDO;
import com.yuyu.shop.domain.shop.repository.ShopRepository;
import com.yuyu.shop.infrastructure.persistence.convert.ShopPoConvert;
import com.yuyu.shop.infrastructure.persistence.mapper.ShopMapper;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author
 * @version 1.0
 * @description: TODO
 * @date 2022/8/4 16:56
 */
@Service
@AllArgsConstructor(onConstructor = @_(@Autowired))
public class ShopRepositoryImpl implements ShopRepository {

    private final ShopMapper shopMapper;

    @Override
    public ShopInfoDO getById(Long id) {
      return ShopPoConvert.PO2DO(shopMapper.selectById(id));
    }
}
